package com.edmendst.xmall;

import com.edmendst.xmall.util.JWTUtil;


import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cache.annotation.EnableCaching;
import org.springframework.context.ConfigurableApplicationContext;
import org.springframework.scheduling.annotation.EnableScheduling;

@SpringBootApplication
@MapperScan("com.edmendst.xmall.mapper")
@EnableCaching  // 启用缓存
@EnableScheduling // 启用定时任务
public class XmallApplication {

	public static void main(String[] args) {
//		SpringApplication.run(XmallApplication.class, args);
		ConfigurableApplicationContext ctx = SpringApplication.run(XmallApplication.class, args);
		JWTUtil jwtUtil = ctx.getBean(JWTUtil.class);
		System.out.println("启动时JWTUtil.secret: " + jwtUtil.getSecret());

	}

}
